package com.four.treatment.controller;

import com.four.common.utils.R;
import com.four.treatment.entity.ReceptionDesk;
import com.four.treatment.service.ReceptionDeskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author:wsy
 * @Date: 2022/01/23/14:04
 * @Description
 */
@RestController
@RequestMapping("/treatment/receptionDesk")
public class ReceptionDeskController {

    @Autowired
    private ReceptionDeskService receptionDeskService;

    /**
     * 患者发送消息
     * 添加到接诊台
     * @param message
     * @param userPhone
     * @param receptionDesk
     * @return
     */
    @PostMapping("/toReception/{message}/{userPhone}/{docId}")
    public R toReception(@PathVariable("message")String message,
                         @PathVariable("userPhone")String userPhone,
                         @PathVariable("docId")Integer docId,
                         @RequestBody ReceptionDesk receptionDesk){
        receptionDeskService.toReception(receptionDesk,message,userPhone,docId);
        return R.ok("接诊成功");
    }
}
